import wepy from 'wepy'

// 封装的错误提示
wepy.baseToast=function(title,icon='none'){
 var titleA=title||'获取分类数据失败'
 var iconA=icon||'none'
  wx.showToast({
    title: titleA,
    icon: iconA,
    duration: 1500
  })
  return ;
}

// 封装的请求
var baseURL='https://www.zhengzhicheng.cn/api/public/v1';
wepy.get=function(url,data={}){
 return wepy.request({
    url: baseURL+url,
    methods: 'GET',
    data
  })
}

wepy.post = function (url, data = {}) {  
  return wepy.request({
    url: baseURL + url,
    method: 'POST',
    data
  })
}


